Development: Show gender-inclusive wording feedback in the AI sidebar - #2630
Development: Show gender-inclusive wording feedback in the AI sidebar#2630ge94zec wants to merge 8 commits into
Development: Show gender-inclusive wording feedback in the AI sidebar#2630Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 2 medium |
| CodeStyle | 3 minor |
🟢 Metrics 23 complexity
Metric Results Complexity 23
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
- display gender decoder results and balance indicator in the AI sidebar - reuse status pills with counts, loading state, and active styling - highlight non-inclusive wording with wavy underlines in the editor - allow filtering between gender and compliance highlights - deduplicate and sanitize non-inclusive words in a shared utility - add English and German translations for the gender pill - remove unrelated background process and analysis pause changes - simplify tests
Feat: Add genderDecoder UI in sidebar
…accuracy-using-ai' into feat/2378-improve-genderdecoder-accuracy-using-ai
Feat: Add genderDecoder UI in sidebarDevelopment: Add genderDecoder UI in sidebar
az108
left a comment
There was a problem hiding this comment.
Nice feature, and the sidebar integration reads well — the shared getUniqueNonInclusiveWords util with its own spec is the right call, and renaming pendingHighlights to pendingComplianceHighlights makes the two highlight paths readable. All three changed spec files pass locally (50 tests).
One blocking issue and one behavioural bug below.
1. Gender-bias highlight markup leaks into the form control (blocking)
stripHighlightMarkup() is the guard that keeps visual-only highlight markup out of the form value, but it only knows about HighlightBlot.className (compliance-highlight). The new gender-bias-highlight spans pass straight through it — see the inline comment on editor.component.ts. Consequences are the persisted description picking up highlight spans, and a self-sustaining loop of analyze-html requests.
Worth noting this makes #2379 measurably worse rather than being a separate concern.
2. Gender pill spinner is bound to the compliance analysis state
See the inline comment on ai-assistant-card.component.html. The pill shows a green "all clear" check while the gender analysis is still in flight on page load, and can never show a spinner again after the first result.
Things I checked and found fine
Flagging these so they don't come up again in a later review round:
- px vs rem (
h-[2px],[text-decoration-thickness:1.5px]) — no rule on units inclient-styling.mdx, and px arbitrary values are used throughout the client (h-[1px],border-[0.5px],text-[10px]). Correct choice for hairlines. - Absolute positioning of the balance scale — the right tool for an overlay marker on a track. Track and pointer centers land 0.2px apart, so nothing is actually misaligned. Only a cosmetic nit below.
- Asserting Tailwind classes in the pointer test — established practice here (
star-rating.component.spec.ts:66-77does the same), and the class string is the only observable output of a 5-branch computed.expect(x).not.toBeNull()is literally the documented pattern inclient-tests.mdx:219. - Static
classplus[class]binding on the pointer — Angular merges both; same pattern already instatus-pill.component.html:11. decoration-text-tertiary— valid,--color-text-tertiaryis inside the@themeblock in_tokens.scss:111.- Gender-decoder logic living in the editor atom — it was already there before this PR, and atoms in this project routinely inject domain services. Not a finding for this PR. I opened #2634 for the follow-up refactor (single highlight API plus a central blot registry), which would make bug 1 structurally impossible to reintroduce.
Nits
- The gender branch of
applyPendingHighlights()has no test coverage. Given bug 1 lives exactly there, one test asserting that the editor HTML written back to the form control contains no highlight spans would be well placed. - PR title:
genderDecoderis a code identifier rather than plain English — something like`Development`: Show gender-inclusive wording feedback in the AI sidebarreads from user impact. The redValidate PR Titlecheck is stale, by the way: the current title matches the regex and just needs a re-run.
Development: Add genderDecoder UI in sidebarDevelopment: Show gender-inclusive wording feedback in the AI sidebar
- strip compliance and gender highlight markup from editor values - track gender analysis loading independently per editor field - bind the gender pill to its dedicated loading state - center the gender balance indicator without fixed offsets - cover editor event handling and pill loading states
Checklist
General
Client
Motivation and Context
Displaying the result in the existing AI assistant sidebar and linking it to editor highlights makes the feedback easier to understand and act on without introducing a separate workflow.
Description
This PR integrates the Gender Decoder results directly into the AI assistant sidebar and the job description editor.
The sidebar now shows the current wording balance as exclusive, neutral, or inclusive, together with the number of detected non-inclusive terms. Selecting the Gender Decoder filter highlights the affected wording directly in the editor independently from the existing compliance highlights.
Steps for Testing
Prerequisites:
Review Progress
Code Review
Manual Tests
Screenshots
Test Coverage
Client
Last updated: 2026-08-19 13:18:47 UTC